-
Notifications
You must be signed in to change notification settings - Fork 260
ci: only check for code coverage at merge, not release #3791
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR aims to control code coverage publication based on the PR’s target branch and surface that branch in the pipeline logs.
- Introduces a commented-out condition to skip coverage reporting for non-master PRs.
- Adds an echo of the PR target branch name to pipeline output for debugging.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| .pipelines/templates/run-unit-tests.yaml | Added a commented-out branch check above coverage task |
| .pipelines/pipeline.yaml | Echoes the PR’s targetBranchName in the environment stage |
Comments suppressed due to low confidence (2)
.pipelines/templates/run-unit-tests.yaml:98
- Remove or clarify this commented-out condition. If you intend to gate coverage reports by branch, uncomment, test, and document the logic, or delete the placeholder to avoid confusion.
# - ${{ if not(contains(variables['System.PullRequest.targetBranchName'], 'master')) }}:
.pipelines/pipeline.yaml:56
- [nitpick] If this echo is only for debugging, add a comment explaining its use or remove it before merging to keep pipeline logs focused.
echo $(System.PullRequest.targetBranchName)
04d585c to
7ffa102
Compare
7ffa102 to
0d11a2f
Compare
|
in other words, i only care about code coverage before a change has merged. if it's merged and we're releasing, coverage is not relevant. |
|
/azp run Azure Container Networking PR |
|
Azure Pipelines successfully started running 1 pipeline(s). |
ci: only check for code coverage
ci: only check for code coverage
ci: only check for code coverage
Reason for Change:
We only need to run code coverage on PR(s) merging to master as
release/*branches are frozen to feature development and would only see a fix if it has already been merged to master as well.Issue Fixed:
Requirements:
Notes: